/*
 * 英才汇硕信息科技有限公司 拥有本软件版权 2021 并保留所有权利。
 * Copyright 2021, YCHS Information&Science Techology Co.,Ltd,
 * All right reserved.
 */
package com.ychs.lawyerback.dto;

import lombok.Data;

/**
 * @author mayujing
 * @version 1.0
 */

public class PageDTO {
    //接收页面传入的页码 第几页
    private Integer page;
    //一页多少条
    private Integer pageSize;
    //sql语句从第几条开始
    private Integer start;

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getStart() {
        if (this.page == null||this.pageSize==null) {
            throw new RuntimeException("页码不存在");
        }
        return (this.page-1)*this.pageSize;
        //这里是赋值给start的值，在#{start}里取值
    }


}
